package com.today.usercenter.network.entity.request;

import com.today.lib.common.network.entity.LoginBaseRequestEntity;
import java.util.Map;

/**
 * Created by cgm on 18-6-20.
 */

public class WxLoginRequestEntity extends LoginBaseRequestEntity {

    public WxLoginRequestEntity(Map<String, String> map) {
        super(LOGIN_WEIXIN_TYPE);
        data.put("openid", map.get("openid"));
        data.put("unionid", map.get("unionid"));
        data.put("headimgurl", map.get("iconurl"));
        data.put("nickname", map.get("name"));
        data.put("city", map.get("city"));
        data.put("province", map.get("province"));
        data.put("country", map.get("country"));
        data.put("language", map.get("language"));

        if ("男".equals(map.get("gender"))) {
            sex = 1;
        } else if ("女".equals(map.get("gender"))) {
            sex = 0;
        }
    }
}
